package com.hz.userService;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("com.hz.userService.mapper")  // 开启MyBatis Plus自动扫描指定路径下Mapper
@EnableDiscoveryClient  // 开启注册中心自动扫描该服务
@EnableFeignClients(basePackages = "com.hz.**")  // 开启Feign调用接口
@ComponentScan("com.hz.**")  // 需要加上这个注解，否则网关不能转发
@EnableCaching  // 启用Redis缓存支持
public class UserServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserServiceApplication.class, args);
    }

}
